<template>
    <div class="content">
        <div class="box">
            <div class="item">
                <div>已创建任务数</div>
                <div class="number">611</div>
            </div>
            <div class="item">
                <div>已完成任务数</div>
                <div class="number">23</div>
            </div>
            <div class="item">
                <div>已接收任务数</div>
                <div class="number">69</div>
            </div>
        </div>
        <div class="circle-box">
            <div class="chart-item">
                <el-progress type="circle" :percentage="25"></el-progress>
                <div class="number-block">
                    <div class="title">累积完成</div>
                    <div class="number-1">23</div>
                    <div class="count">任务数</div>
                </div>
            </div>
            <div class="chart-item">
                <el-progress type="circle" :percentage="25" color="#82d1dd"></el-progress>
                <div class="number-block">
                    <div class="title">近一个月完成</div>
                    <div class="number-2">11</div>
                    <div class="count">任务数</div>
                </div>
            </div>
            <div class="chart-item">
                <el-progress type="circle" :percentage="25" color="#dba358"></el-progress>
                <div class="number-block">
                    <div class="title">近一周完成</div>
                    <div class="number-3">3</div>
                    <div class="count">任务数</div>
                </div>
            </div>
        </div>
        <div class="chart-box">
            <div class="title">接收的任务</div>
            <div class="flex-box">
                <simple-bar id="left-1" :data="left_1"></simple-bar>
                <line-simple id="right-1" :data="left_1" :is_smooth="true"></line-simple>
            </div>
        </div>
        <div class="chart-box">
            <div class="title">接收的任务</div>
            <div class="flex-box">
                <simple-bar id="left-2" :data="left_1"></simple-bar>
                <line-simple id="right-2" :data="left_1" :is_smooth="true"></line-simple>
            </div>
        </div>
    </div>
</template>

<script>
import SimpleBar from "@/components/charts/SimpleBar.vue";
import LineSimple from "@/components/charts/LineSimple.vue";

export default {
    name: 'person-center-appraise',
    components: {
        SimpleBar,
        LineSimple
    },
    data() {
        return {
            left_1: {
                x: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
                data: [[0,0,0,0,5,4,11,8,15,0,0,0], [0,0,0,0,1,0,2,4,11,0,0,0]],
                name: ['任务总数', '完成数'],
                color: ["#5ed8eb", "#649dfa"]
            }
        }
    }
}
</script>

<style scoped>
.content {
    background-color: #f8f9fa;
    width: 100%;
    height: 100vh;
    position: absolute;
}
.box {
    display: flex;
    flex-wrap: nowrap;
    text-align: center;
    background-color: #fff;
    padding-bottom: 20px;
    box-shadow:0 0 10px 0 rgba(53,129,251,0.10);
    border-radius:2px;
}
.box .item {
    width: 33%;
    margin-top: 20px;
    border-right: 1px solid #f6f6f6;
}
.box .item:last-of-type {
    border-right: none;
}

.item .number {
    font-size: 35px;
    margin-top: 8px;
}
.circle-box {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    vertical-align: top;
}
.chart-item {
    padding-top: 20px;
    background-color: #fff;
    margin-left: 20px;
    flex: 1;
    text-align: center;
    padding-bottom: 20px;
    box-shadow:0 0 10px 0 rgba(53,129,251,0.10);
    border-radius:2px;
}
.chart-item:first-of-type {
    margin-left: 0;
}
.number-block {
    display: inline-block;
    height: 100%;
    vertical-align: top;
    margin-left: 18px;
    margin-top: 18px;
}
.number-block .title {
    font-size: 16px;
    font-weight: 600;
}
.number-block .number-1 {
    color: #3581fb;
}
.number-block .number-2 {
    color: #82d1dd;
}
.number-block .number-3 {
    color: #dba358;
}
.number-block .number-1, .number-block .number-2, .number-block .number-3 {
    font-size: 35px;
    font-weight: 600;
}
.chart-box {
    background-color: #fff;
    margin-top: 20px;
    padding: 20px;
    box-shadow:0 0 10px 0 rgba(53,129,251,0.10);
    border-radius:2px;
}
.flex-box {
    display: flex;
    text-align: center;
    justify-content: center;
}
#left-1, #right-1, #left-2, #right-2{
    height: 400px;
    flex: 1;
}
</style>
